package com.ljh.ioc.component;

import com.ljh.ioc.model.DbTypes;
import com.ljh.ioc.model.Person;
import jakarta.annotation.PostConstruct;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Controller;

/**
 * @author: Themberfue
 * @date: 2025/2/20 20:10
 * @description:
 */
@Controller
public class YmlController {
    @Value("${my.key3}")
    public Integer myKey3;

    @Value("${my.key4}")
    public String myKey4;

    @Autowired
    Person person;

    @Autowired
    DbTypes dbTypes;

    @PostConstruct
    public void init() {
        System.out.println("myKey3: " + myKey3);
        System.out.println("myKey4: " + myKey4);
        System.out.println("person: " + person);
        System.out.println("dbTypes: " + dbTypes);
    }
}
